package com.linearList;

/**
 * @Author: linKe
 * @Date: 2021/12/30 14:32
 * @FileName: DoubleNode
 * @version: 1.0
 * @Description: 双链表结点类
 */
public class DoubleNode<T> {
    /**数据域*/
    T data;

    /**存储域 prev前驱结点，next后继结点*/
    DoubleNode<T> prev,next;

    public T getData(){
        return this.data;
    }

    /**空参构造对象
     *
     */
    DoubleNode(){
        this(null,null,null);
    }

    /** 数据域构造对象*/
    DoubleNode(T data){
        this(data,null,null);
    }

    /**全参构造对象*/
    DoubleNode(T data,DoubleNode<T> prev,DoubleNode<T> next){
        this.data = data;
        this.prev = prev;
        this.next = next;
    }
}
